<?php
	require_once("actions/ContactAction.php");
	$action = new ContactAction();
	$action->execute();
	include("header.php");
?>

<script type="text/javascript">
	$(document).ready(function(){
	    $("#contact").accordion({autoheight: false});
	  });
  </script>
	
	
	<div id='contact'>
	<?php
		$resultat=$action->lireContact();
		if (count($resultat)>0)
			foreach($resultat as $ligne){
				$nom = "".$action->lireNode("contact","nom");
				$prenom = "".$action->lireNode("contact","prenom");
				$courriel = "".$action->lireNode("contact","courriel");
				$tel = "".$action->lireNode("contact","tel");
				$fax = "".$action->lireNode("contact","fax");
				$textecourriel = "".$action->lireNode("contact","textecourriel");
				$textetel = "".$action->lireNode("contact","textetel");
				$textefax = "".$action->lireNode("contact","textefax");
	?>			
		
			<h3><a href="#"><?php echo($ligne[$prenom]." ".$ligne[$nom]) ?></a></h3>			
			<!--div vide essentiel a cause du jQuery. ask the guy who made it -->
			
			<div>
				<div id='contactDetail'>
					<div id='contactCourriel'><?php echo($textecourriel . $ligne[$courriel]) ?></div>
					<div id='contactTel'><?php echo($textetel . $ligne[$tel]) ?></div>
					<div id='contactFax'><?php echo($textefax . $ligne[$fax]) ?></div>
					<div id="clear"></div>
				</div>
			</div>
	<?php
		}
	?>
	</div>

	<div id='map'>
		<div id="map_canvas" style = "height:335px; width:500px;"></div>
	</div>
	
  
<?php 
	include("footer.php");
?>